package redis

import (
	"fmt"
	"github.com/go-redis/redis/v8"
	"user/appconfig"
)

var Client *redis.Client

func ExampleNewClient() {
	data := appconfig.Data.Redis
	Client = redis.NewClient(&redis.Options{
		Addr:     data.Addr,
		Password: data.Password,
		DB:       data.DB,
	})

	fmt.Println("redis连接成功")
}
